import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"

// 待安排进度明细
export const ScheduleDetailsHaveBeenArranged = (parms:any) => {
    return service.post<any,any>(`/Mold/Prog/temp`,parms)
}

// 生产线
export const productionLine = () => {
    return service.post<any,any>(`/Mold/Prog/line/temp`)
}

// 已安排指令
export const unscheduledLotNo = (parms:any) => {
    return service.post<any,any>(`/Mold/Prog/detail`,parms)
}

// 整单安排
export const BlockArrangement = (parms:any) => {
    return LoginWork.put<any,any>(`/Mold/Prog/sch?line=${parms.line}&seqNo=${parms.seqNo}`,parms.lotNoList)
}

// 更新指令
export const ubDateLotNo = () => {
    return LoginWork.get<any,any>(`/Mold/Prog/update/lot`)
}

// 品牌查询
export const brandQuery = () => {
    return service.get<any,any>(`/Mold/Prog/brand/back`)
}

// 拆单查询
export const OpenOrderQuery = (lotNo:string) => {
    return service.post<any,any>(`/Mold/Prog/ls/query?lotNo=${lotNo}`)
}

// 拆单安排
export const OpenOrder = (parms:any) => {
    return LoginWork.post<any,any>(`/Mold/Prog/sch/ls?lotNo=${parms.lotNo}&line=${parms.line}&seqNo=${parms.seqNo}`,parms.lsNo)
}

// 取消安排
export const CancelArrangement = (parms:any) => {
    return LoginWork.put<any,any>(`/Mold/Prog/sch/cancel`,parms)
}

// 调整进度
export const AdjustTheSchedule = (parms:any) => {
    return LoginWork.put<any,any>(`/Mold/Prog/line/move`,parms)
}

// 更新进度表
export const UpdateTheSchedule = () => {
    return LoginWork.get<any,any>(`/Mold/Prog/sch/up`)
}